package com.cskaoyan.service;

import com.cskaoyan.dao.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author stone
 * @date 2022/05/24 14:42
 */
@Component
public class UserServiceImpl implements UserService{

    @Autowired
    UserMapper userMapper;

    /*@Value("ligenli")
    String username;*/
    //String username = "ligenli";

    //通过key来引入对应的value
    @Value("${demo1.username}")
    String username;

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }
}
